<template>
  <div class="charts">
    <v-chart :option="getOptions()"></v-chart>
  </div>
</template>

<script setup lang="ts">
    //图形图标
const getOptions = () => {
  return {
    xAxis: {
      show: false,
    //最大数值
      max: 100,
    //最小数值
      min: 0,
    },
    yAxis: {
      type: "category",
      show: false,
    },
    series: {
      type: "bar",
      data: [33],
      barWidth: 10,
      backgroundStyle: {
        color: '#ccc'
      },
      showBackground: true,
      itemStyle: {
        color: '#bfa'
      },

      label: {
        show: true,
        position: 'right',
        formatter: '|',
        color: '#bfc'
      }
    },
    grid: {
      left: 0,
      top: 0,
      right: 0,
      bottom: 0,
    },
  };
};
</script>

<style scoped>
.charts {
  width: 100%;
  height: 100%;
}
</style>